Calls worker.terminate()
when the dispose scope is exited.
async function example() {
await using worker = new Worker('for (;;) {}', { eval: true });
// Worker is automatically terminate when the scope is exited.
}
method
Calls worker.terminate()
when the dispose scope is exited.
async function example() {
await using worker = new Worker('for (;;) {}', { eval: true });
// Worker is automatically terminate when the scope is exited.
}